﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NineMine.DataModel
{
    public class Query
    {
        [Key]
        public long Id { get; set; }

        [Required]
        public Project Project { get; set; }

        [MaxLength(255)]
        public string Name { get; set; }

        [Column(TypeName = "ntext")]
        public string Filters { get; set; }

        public User User { get; set; }

        public bool IsPublic { get; set; }

        [Column(TypeName = "ntext")]
        public string ColumnNaes { get; set; }

        [Column(TypeName = "ntext")]
        public string SortCriteria { get; set; }

        [MaxLength(255)]
        public string GroupBy { get; set; }

        [MaxLength(255)]
        public string QueryType { get; set; }
    }
}
